package com.czk.model.adaptor.objectAdaptorPra;

/**
 * @Author:ChenZhangKun
 * @Date: 2020/6/11 23:28
 */
public class WaterPipAdaptor implements SmallWaterPip {
    // 将要被适配的对象聚合在里面
    private BigWaterPip bigWaterPip;

    public WaterPipAdaptor(BigWaterPip bigWaterPip) {
        this.bigWaterPip = bigWaterPip;
    }

    @Override
    public int output() {
        // 得到被适配对象的结果
        int input = bigWaterPip.input();
        int smallDisplacement=input/10;
        return smallDisplacement;
    }
}
